package cc.uncarbon.module.custom.model.response;

import cc.uncarbon.framework.core.constant.HelioConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import cc.uncarbon.framework.core.enums.YesOrNoEnum;
import cc.uncarbon.framework.core.enums.EnabledStatusEnum;


/**
 * 项目信息 BO
 */
@Accessors(chain = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ItemBO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
    private Long id;

    @Schema(description = "项目名称")
    private String name;

    @Schema(description = "项目缩略图URL")
    private String thumbnail;

    @Schema(description = "目标使用人群")
    private String targetAudience;

    @Schema(description = "项目适用的身体部位")
    private String bodyPart;

    @Schema(description = "服务持续时长，如90分钟")
    private String serviceDuration;

    @Schema(description = "项目详细描述")
    private String detailDescription;

    @Schema(description = "当前售价（分）")
    private Integer currentPrice;

    @Schema(description = "会员专享价格（分）")
    private Integer memberPrice;

    @Schema(description = "疗程套餐价格（分）")
    private Integer coursePrice;

    @Schema(description = "商品原价（分）")
    private Integer originalPrice;

    @Schema(description = "项目页面浏览次数")
    private Integer viewCount;

    @Schema(description = "累计销售数量")
    private Integer salesVolume;

    @Schema(description = "列表排序序号")
    private Integer sortOrder;

    @Schema(description = "项目状态：0=禁用，1=启用")
    private EnabledStatusEnum status;

    @Schema(description = "所属店铺ID")
    private Integer storeId;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @DateTimeFormat(pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = HelioConstant.Jackson.DATE_TIME_FORMAT)
    private LocalDateTime updatedAt;

}
